<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script type="text/javascript" src="../public/cdn/axios/1.0.0/axios.min.js"></script>
    <script type="text/javascript" src="../public/cdn/mock/1.0.0/mock-min.js"></script>
</head>

<body>
</body>
<script type="text/javascript">
    Mock.mock("json/data.json", {
        'username': '@cname',
        'float|1-1000.2': 1,
        'datetime': '@datetime("yyyy-MM-dd HH:mm:ss")'
    })

    axios
        .get("json/data.json")
        .then((resp) => {
            console.log("成功", resp)
        })
        .catch((err) => {
            console.log("失败", err)
        });
</script>
</html>
